package com.sun.entitys.users;


import com.sun.entitys.BaseEntity;
import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 菜单实体类
 *
 * @Author sun
 * @CreateTime 2025/9/6 20:17
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "t_menu")

public class Menu extends BaseEntity {

    private long parentId;
    private String path;
    private String icons;
    private int level;
    @OneToMany
    @JoinColumn(name = "menuId")
    private List<Permission> permissions;
}
